
import axios from '../handleService'

export default {
  // getJobList: ({ params, dataTypeSubUrl }) => axios.get(`/api/jobs${dataTypeSubUrl}?${params}`),
  getCodeById: job_id => axios.get(`/api/job/${job_id}/content`),
  // deleteJobs: ids => axios.delete(`/api/jobs/${ids}`),
  getJobLogs: ({ job_id, offset = -1 }) => axios.get(`/api/job/${job_id}/log?offset=${offset}`),

  // 任务管理列表
  getJobList: (params) => axios.post(`/api/job/listOfPage`, params),
  // 任务删除 
  deleteJobs: ids => axios.delete(`/api/job/batchDelete`, { data: ids }),
  // 任务运行
  startExcute: id => axios.put(`/api/job/${id}/execution`),
}